package cn.iocoder.yudao.module.gpt.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.security.PermitAll;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name =  "管理后台 - 测试")
@RestController
@RequestMapping("/gpt/test")
@Validated
@Slf4j
public class TestRestController {
    @GetMapping ("/swagger")
    @PermitAll
    @Operation(summary = "测试swagger")
    @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
    public CommonResult<String> swagger() {
        return success("测试成功");
    }
}
